/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.subsystems;

import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.Victor;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.templates.RobotMap;
import edu.wpi.first.wpilibj.templates.commands.SlashStop;

/**
 *
 * @author Jared
 */
public class Slash extends Subsystem {
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    
    private static Slash instance = null;
    private SpeedController slash_motor;
    
    public static Slash getInstance() {
    if(instance == null) {
        instance = new Slash();
        
        }
        return instance;
    }
    private Slash(){
        slash_motor = new Victor(RobotMap.SLASH_MOTOR_PORT);
        
        
    }     
    
    public void up(){
        slash_motor.set(1);
    }
    
    public void down(){
        slash_motor.set(-1);
    }
    
    public void stop(){
        slash_motor.set(0);
    }
    public void initDefaultCommand() {
        setDefaultCommand(new SlashStop());
        
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }
}
